require 'rubygems'

gem 'Mxx_ru', '>= 1.4.7'

require 'mxx_ru/cpp/qt4'

Mxx_ru::Cpp::exe_target {

	rtl_mode( Mxx_ru::Cpp::RTL_SHARED )
	rtti_mode( Mxx_ru::Cpp::RTTI_ENABLED )
	threading_mode( Mxx_ru::Cpp::THREADING_MULTI )

	required_prj( "excel/prj.rb" )

	screen_mode( Mxx_ru::Cpp::SCREEN_WINDOW )

	qt = generator( MxxRu::Cpp::Qt4.new( self ) )
	qt.use_modules( QT_CORE, QT_GUI, QT_XML, QT_SQL )

	target( "eShopHelper" )

	if 'mswin' == toolset.tag( 'target_os' )
		lib( "qtmain" )
	end

	if "vc" == toolset.name
		global_compiler_option( "/Zc:wchar_t-" )
	end

	qt.ui( "mainwindow.ui" )
	qt.ui( "correspondence.ui" )
	qt.ui( "currency.ui" )

	qt.h2moc( "h/mainwindow.hpp" )
	qt.h2moc( "h/correspondence.hpp" )
	qt.h2moc( "h/currency.hpp" )
	qt.h2moc( "h/model.hpp" )

	qt.cpp2moc( "mainwindow.cpp" )
	qt.cpp2moc( "correspondence.cpp" )

	qt.qrc2cpp( "resources.qrc" )

	cpp_source( "format.cpp" )
	cpp_source( "goods.cpp" )
	cpp_source( "model.cpp" )
	cpp_source( "currency.cpp" )
	cpp_source( "settings.cpp" )
	cpp_source( "excel.cpp" )
	cpp_source( "document.cpp" )
	cpp_source( "correspondence.cpp" )
	cpp_source( "db.cpp" )
	cpp_source( "mainwindow.cpp" )
	cpp_source( "main.cpp" )
}
